de.ueberdosis.mp3info.id3v2
Class FrameCOMM

java.lang.Object
  |
  +--de.ueberdosis.mp3info.id3v2.ID3V2Frame
        |
        +--de.ueberdosis.mp3info.id3v2.FrameCOMM
All Implemented Interfaces:
Defines, EncDescValFrame

public class FrameCOMM
extends ID3V2Frame
implements EncDescValFrame

Comments frame This frame is indended for any kind of full text information that does not fit in any other frame. It consists of a frame header followed by encoding, language and content descriptors and is ended with the actual comment as a text string. Newline characters are allowed in the comment text string. There may be more than one comment frame in each tag, but only one with the same language and content descriptor.

Text encoding $xx Language $xx xx xx Short content descrip. $00 (00) The actual text


Field Summary
 
Fields inherited from class de.ueberdosis.mp3info.id3v2.ID3V2Frame
dataChanged, deprecatedSince, legalSince
 
Fields inherited from interface de.ueberdosis.mp3info.Defines
DEFAULT_ENCODING, ID3V2_FOOTER_SIZE, ID3V2_FRAME_HEADER_SIZE, ID3V2_HEADER_SIZE, ID3V2_X_HEADER_SIZE, MP3_FRAME_HEADER_SIZE, SUPPORTED_NUMBER_OF_EXTENDED_FLAG_BYTES, testPositions, VERSION
 
Constructor Summary
FrameCOMM()
           
FrameCOMM(de.ueberdosis.mp3info.id3v2.ID3V2Frame frame)
           
FrameCOMM(de.ueberdosis.mp3info.id3v2.ID3V2Frame frm, de.ueberdosis.mp3info.id3v2.DataSource ds)
           
 
Method Summary
 boolean canDisplay()
          Informs if the frame can create a component to display its contents To be overwritten by subclasses
 boolean canEdit()
          Informs if the frame can create a component to edit its contents To be overwritten by subclasses
 boolean containsData()
          Denotes if actual data are in this frame.
 de.ueberdosis.mp3info.gui.Id3JPanel createJPanel(boolean edit, boolean selfupdate)
          Creates a JPanel to display or edit the contents of the frame.
 byte[] getData()
          creates an byte array containing the data in the Frame.
 java.lang.String getLongName()
           
 java.lang.String getText()
           
 java.lang.String getValue()
           
 void setDescription(java.lang.String txt)
           
 void setText(java.lang.String t)
          Sets the content of the comment, not its description
 void setValue(java.lang.String txt)
           
 java.lang.String toString()
           
 
Methods inherited from class de.ueberdosis.mp3info.id3v2.ID3V2Frame
createPanel, deprecatedSince, equals, getDataLengthIndicator, getFileAlterPreservation, getFrameID, getSize, getTagAlterPreservation, getUnsynchronisation, hasGroupingIdentity, isAltered, isCompressed, isEncrypted, isReadOnly, isValid, legalSince, toByteArray
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FrameCOMM

public FrameCOMM()

FrameCOMM

public FrameCOMM(de.ueberdosis.mp3info.id3v2.ID3V2Frame frame)

FrameCOMM

public FrameCOMM(de.ueberdosis.mp3info.id3v2.ID3V2Frame frm,
                 de.ueberdosis.mp3info.id3v2.DataSource ds)
          throws SeekPastEndException
Method Detail

getLongName

public java.lang.String getLongName()

toString

public java.lang.String toString()
Overrides:
toString in class ID3V2Frame

containsData

public boolean containsData()
Description copied from class: ID3V2Frame
Denotes if actual data are in this frame. Some Frames have a minimum size that is greater than the header although they don't contain any data. So I can't generally determine if a Frame is empty just by asking for its size.
To be overwritten by subclasses.

Overrides:
containsData in class ID3V2Frame

getData

public byte[] getData()
Description copied from class: ID3V2Frame
creates an byte array containing the data in the Frame. Dummy implementation, to be overwritten by the actual Frames

Overrides:
getData in class ID3V2Frame

canEdit

public boolean canEdit()
Description copied from class: ID3V2Frame
Informs if the frame can create a component to edit its contents To be overwritten by subclasses

Specified by:
canEdit in interface EncDescValFrame
Overrides:
canEdit in class ID3V2Frame

canDisplay

public boolean canDisplay()
Description copied from class: ID3V2Frame
Informs if the frame can create a component to display its contents To be overwritten by subclasses

Specified by:
canDisplay in interface EncDescValFrame
Overrides:
canDisplay in class ID3V2Frame

createJPanel

public de.ueberdosis.mp3info.gui.Id3JPanel createJPanel(boolean edit,
                                                        boolean selfupdate)
Description copied from class: ID3V2Frame
Creates a JPanel to display or edit the contents of the frame. To be overwritten by subclasses. The results of canDisplay / canEdit are only binding for this method (ie. for JPanels). AWT-Panels may or may not be implemented.

Overrides:
createJPanel in class ID3V2Frame
Parameters:
edit - switches between display- (false) and edit-mode (true)
selfupdate - switches if the created component takes care of updating its data or not. Generally this means that the component carries its own update-button.
Of course, selfupdate is useless without edit set to true.
Returns:
a JPanel that can be used to display or edit the contents

setDescription

public void setDescription(java.lang.String txt)
Specified by:
setDescription in interface EncDescValFrame

setValue

public void setValue(java.lang.String txt)
Specified by:
setValue in interface EncDescValFrame

getValue

public java.lang.String getValue()

setText

public void setText(java.lang.String t)
Sets the content of the comment, not its description


getText

public java.lang.String getText()
Returns:
the comment, not its description